<script type="text/javascript">
	// let params={url:"/87-59",id:1001}

	//结构赋值
	// let {url,id}=params;
	// console.log(url,id)

	// 扩展运算符
	// let result ={
	// 	address:"北京朝阳",
	// 	...params
	// }
	// console.log(result)


	// let arr=["北京","上海","广州","深圳"];

	// let index=arr.findIndex((item,index)=>{
	// 	return item=="杭州"
	// })
	// console.log(index)

	let arr=[
		{id:1001,name:"八戒"},
		{id:1002,name:"悟空"},
		{id:1003,name:"沙和尚"},
		{id:1004,name:"唐僧"}
	]


	let index =arr.findIndex(item=>{
		return item.name=="白骨精"
	})
	console.log(index)



</script>